 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKDetection/DetectionModel.h>

@implementation TemplateOption
-(id) initWithTemplateId:(NSString*) templateId
      templateType:(NSNumber*)templateType { 
     self.templateId = templateId;               
     self.templateType = templateType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self templateId])
    {
        [result setValue:[self templateId] forKey:@"templateId"];
    }
    if([self templateType])
    {
        [result setValue:[self templateType] forKey:@"templateType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.templateId = [dictionary objectForKey:@"templateId"];
    self.templateType = [dictionary objectForKey:@"templateType"];
    return self;
}
 @end
@implementation RuleCounting
-(id) initWithAlarmRuleCount:(NSNumber*) alarmRuleCount
      disableRuleCount:(NSNumber*)disableRuleCount
      normalRuleCount:(NSNumber*)normalRuleCount
      product:(NSString*)product
      totalRuleCount:(NSNumber*)totalRuleCount
      unknownRuleCount:(NSNumber*)unknownRuleCount { 
     self.alarmRuleCount = alarmRuleCount;               
     self.disableRuleCount = disableRuleCount;               
     self.normalRuleCount = normalRuleCount;               
     self.product = product;               
     self.totalRuleCount = totalRuleCount;               
     self.unknownRuleCount = unknownRuleCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmRuleCount])
    {
        [result setValue:[self alarmRuleCount] forKey:@"alarmRuleCount"];
    }
    if([self disableRuleCount])
    {
        [result setValue:[self disableRuleCount] forKey:@"disableRuleCount"];
    }
    if([self normalRuleCount])
    {
        [result setValue:[self normalRuleCount] forKey:@"normalRuleCount"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self totalRuleCount])
    {
        [result setValue:[self totalRuleCount] forKey:@"totalRuleCount"];
    }
    if([self unknownRuleCount])
    {
        [result setValue:[self unknownRuleCount] forKey:@"unknownRuleCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmRuleCount = [dictionary objectForKey:@"alarmRuleCount"];
    self.disableRuleCount = [dictionary objectForKey:@"disableRuleCount"];
    self.normalRuleCount = [dictionary objectForKey:@"normalRuleCount"];
    self.product = [dictionary objectForKey:@"product"];
    self.totalRuleCount = [dictionary objectForKey:@"totalRuleCount"];
    self.unknownRuleCount = [dictionary objectForKey:@"unknownRuleCount"];
    return self;
}
 @end
@implementation SiteMonitorFtpOption
-(id) initWithLoginType:(NSString*) loginType
      passwd:(NSString*)passwd
      timeout:(NSNumber*)timeout
      user:(NSString*)user { 
     self.loginType = loginType;               
     self.passwd = passwd;               
     self.timeout = timeout;               
     self.user = user;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self loginType])
    {
        [result setValue:[self loginType] forKey:@"loginType"];
    }
    if([self passwd])
    {
        [result setValue:[self passwd] forKey:@"passwd"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    if([self user])
    {
        [result setValue:[self user] forKey:@"user"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.loginType = [dictionary objectForKey:@"loginType"];
    self.passwd = [dictionary objectForKey:@"passwd"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    self.user = [dictionary objectForKey:@"user"];
    return self;
}
 @end
@implementation SiteMonitorPingOption
-(id) initWithPacketCount:(NSNumber*) packetCount
      timeout:(NSNumber*)timeout { 
     self.packetCount = packetCount;               
     self.timeout = timeout;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self packetCount])
    {
        [result setValue:[self packetCount] forKey:@"packetCount"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.packetCount = [dictionary objectForKey:@"packetCount"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    return self;
}
 @end
@implementation RuleState
-(id) initWithResourceId:(NSString*) resourceId
      ruleCount:(NSNumber*)ruleCount
      state:(NSNumber*)state { 
     self.resourceId = resourceId;               
     self.ruleCount = ruleCount;               
     self.state = state;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self ruleCount])
    {
        [result setValue:[self ruleCount] forKey:@"ruleCount"];
    }
    if([self state])
    {
        [result setValue:[self state] forKey:@"state"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.ruleCount = [dictionary objectForKey:@"ruleCount"];
    self.state = [dictionary objectForKey:@"state"];
    return self;
}
 @end
@implementation SiteMonitorHttpOption
-(id) initWithCookie:(NSMutableDictionary<NSString*,NSString*>*) cookie
      header:(NSMutableDictionary<NSString*,NSString*>*)header
      method:(NSString*)method
      reqContent:(NSString*)reqContent
      resCheck:(NSString*)resCheck
      resCheckType:(NSString*)resCheckType { 
     self.cookie = cookie;               
     self.header = header;               
     self.method = method;               
     self.reqContent = reqContent;               
     self.resCheck = resCheck;               
     self.resCheckType = resCheckType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cookie])
    {
        [result setValue:[self cookie] forKey:@"cookie"];
    }
    if([self header])
    {
        [result setValue:[self header] forKey:@"header"];
    }
    if([self method])
    {
        [result setValue:[self method] forKey:@"method"];
    }
    if([self reqContent])
    {
        [result setValue:[self reqContent] forKey:@"reqContent"];
    }
    if([self resCheck])
    {
        [result setValue:[self resCheck] forKey:@"resCheck"];
    }
    if([self resCheckType])
    {
        [result setValue:[self resCheckType] forKey:@"resCheckType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cookie = [dictionary objectForKey:@"cookie"];
    self.header = [dictionary objectForKey:@"header"];
    self.method = [dictionary objectForKey:@"method"];
    self.reqContent = [dictionary objectForKey:@"reqContent"];
    self.resCheck = [dictionary objectForKey:@"resCheck"];
    self.resCheckType = [dictionary objectForKey:@"resCheckType"];
    return self;
}
 @end
@implementation DetectionTagFilter
-(id) initWithKey:(NSString*) key
      values:(NSArray<NSString*>*)values { 
     self.key = key;               
     self.values = values;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.values = [dictionary objectForKey:@"values"];
    return self;
}
 @end
@implementation ResourceItem
-(id) initWithRegion:(NSString*) region
      resourceId:(NSString*)resourceId { 
     self.region = region;               
     self.resourceId = resourceId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    return self;
}
 @end
@implementation NoticeLevel
-(id) initWithCustom:(NSNumber*) custom
      levels:(NSMutableDictionary<NSString*,NSNumber*>*)levels { 
     self.custom = custom;               
     self.levels = levels;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self custom])
    {
        [result setValue:[self custom] forKey:@"custom"];
    }
    if([self levels])
    {
        [result setValue:[self levels] forKey:@"levels"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.custom = [dictionary objectForKey:@"custom"];
    self.levels = [dictionary objectForKey:@"levels"];
    return self;
}
 @end
@implementation UpdateWebHookOut
-(id) initWithSuccess:(NSNumber*) success { 
     self.success = success;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self success])
    {
        [result setValue:[self success] forKey:@"success"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.success = [dictionary objectForKey:@"success"];
    return self;
}
 @end
@implementation SiteMonitorUdpOption
-(id) initWithReqContent:(NSString*) reqContent
      reqContentType:(NSString*)reqContentType
      resCheck:(NSString*)resCheck
      resCheckType:(NSString*)resCheckType
      timeout:(NSNumber*)timeout { 
     self.reqContent = reqContent;               
     self.reqContentType = reqContentType;               
     self.resCheck = resCheck;               
     self.resCheckType = resCheckType;               
     self.timeout = timeout;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self reqContent])
    {
        [result setValue:[self reqContent] forKey:@"reqContent"];
    }
    if([self reqContentType])
    {
        [result setValue:[self reqContentType] forKey:@"reqContentType"];
    }
    if([self resCheck])
    {
        [result setValue:[self resCheck] forKey:@"resCheck"];
    }
    if([self resCheckType])
    {
        [result setValue:[self resCheckType] forKey:@"resCheckType"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.reqContent = [dictionary objectForKey:@"reqContent"];
    self.reqContentType = [dictionary objectForKey:@"reqContentType"];
    self.resCheck = [dictionary objectForKey:@"resCheck"];
    self.resCheckType = [dictionary objectForKey:@"resCheckType"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    return self;
}
 @end
@implementation Location
-(id) initWithSloc:(NSString*) sloc
      slocName:(NSString*)slocName
      isIpv6:(NSNumber*)isIpv6 { 
     self.sloc = sloc;               
     self.slocName = slocName;               
     self.isIpv6 = isIpv6;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self sloc])
    {
        [result setValue:[self sloc] forKey:@"sloc"];
    }
    if([self slocName])
    {
        [result setValue:[self slocName] forKey:@"slocName"];
    }
    if([self isIpv6])
    {
        [result setValue:[self isIpv6] forKey:@"isIpv6"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.sloc = [dictionary objectForKey:@"sloc"];
    self.slocName = [dictionary objectForKey:@"slocName"];
    self.isIpv6 = [dictionary objectForKey:@"isIpv6"];
    return self;
}
 @end
@implementation SiteMonitorSmtpOption
-(id) initWithPasswd:(NSString*) passwd
      protocol:(NSString*)protocol
      timeout:(NSNumber*)timeout
      user:(NSString*)user { 
     self.passwd = passwd;               
     self.protocol = protocol;               
     self.timeout = timeout;               
     self.user = user;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self passwd])
    {
        [result setValue:[self passwd] forKey:@"passwd"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    if([self user])
    {
        [result setValue:[self user] forKey:@"user"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.passwd = [dictionary objectForKey:@"passwd"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    self.user = [dictionary objectForKey:@"user"];
    return self;
}
 @end
@implementation SiteMonitorDnsOption
-(id) initWithCheckType:(NSString*) checkType
      expectAlias:(NSString*)expectAlias
      expectIP:(NSString*)expectIP
      server:(NSString*)server
      timeout:(NSNumber*)timeout { 
     self.checkType = checkType;               
     self.expectAlias = expectAlias;               
     self.expectIP = expectIP;               
     self.server = server;               
     self.timeout = timeout;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self checkType])
    {
        [result setValue:[self checkType] forKey:@"checkType"];
    }
    if([self expectAlias])
    {
        [result setValue:[self expectAlias] forKey:@"expectAlias"];
    }
    if([self expectIP])
    {
        [result setValue:[self expectIP] forKey:@"expectIP"];
    }
    if([self server])
    {
        [result setValue:[self server] forKey:@"server"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.checkType = [dictionary objectForKey:@"checkType"];
    self.expectAlias = [dictionary objectForKey:@"expectAlias"];
    self.expectIP = [dictionary objectForKey:@"expectIP"];
    self.server = [dictionary objectForKey:@"server"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    return self;
}
 @end
@implementation SiteMonitorSource
-(id) initWithSisp:(NSString*) sisp
      sispName:(NSString*)sispName
      sloc:(NSString*)sloc
      slocName:(NSString*)slocName { 
     self.sisp = sisp;               
     self.sispName = sispName;               
     self.sloc = sloc;               
     self.slocName = slocName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self sisp])
    {
        [result setValue:[self sisp] forKey:@"sisp"];
    }
    if([self sispName])
    {
        [result setValue:[self sispName] forKey:@"sispName"];
    }
    if([self sloc])
    {
        [result setValue:[self sloc] forKey:@"sloc"];
    }
    if([self slocName])
    {
        [result setValue:[self slocName] forKey:@"slocName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.sisp = [dictionary objectForKey:@"sisp"];
    self.sispName = [dictionary objectForKey:@"sispName"];
    self.sloc = [dictionary objectForKey:@"sloc"];
    self.slocName = [dictionary objectForKey:@"slocName"];
    return self;
}
 @end
@implementation SiteMonitorTcpOption
-(id) initWithReqContent:(NSString*) reqContent
      reqContentType:(NSString*)reqContentType
      resCheck:(NSString*)resCheck
      resCheckType:(NSString*)resCheckType
      timeout:(NSNumber*)timeout { 
     self.reqContent = reqContent;               
     self.reqContentType = reqContentType;               
     self.resCheck = resCheck;               
     self.resCheckType = resCheckType;               
     self.timeout = timeout;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self reqContent])
    {
        [result setValue:[self reqContent] forKey:@"reqContent"];
    }
    if([self reqContentType])
    {
        [result setValue:[self reqContentType] forKey:@"reqContentType"];
    }
    if([self resCheck])
    {
        [result setValue:[self resCheck] forKey:@"resCheck"];
    }
    if([self resCheckType])
    {
        [result setValue:[self resCheckType] forKey:@"resCheckType"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.reqContent = [dictionary objectForKey:@"reqContent"];
    self.reqContentType = [dictionary objectForKey:@"reqContentType"];
    self.resCheck = [dictionary objectForKey:@"resCheck"];
    self.resCheckType = [dictionary objectForKey:@"resCheckType"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    return self;
}
 @end
@implementation SiteMonitorPop3Option
-(id) initWithPasswd:(NSString*) passwd
      protocol:(NSString*)protocol
      timeout:(NSNumber*)timeout
      user:(NSString*)user { 
     self.passwd = passwd;               
     self.protocol = protocol;               
     self.timeout = timeout;               
     self.user = user;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self passwd])
    {
        [result setValue:[self passwd] forKey:@"passwd"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    if([self user])
    {
        [result setValue:[self user] forKey:@"user"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.passwd = [dictionary objectForKey:@"passwd"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    self.user = [dictionary objectForKey:@"user"];
    return self;
}
 @end
@implementation DetectionFilter
-(id) initWithName:(NSString*) name
      values:(NSArray<NSString*>*)values { 
     self.name = name;               
     self.values = values;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self values])
    {
        [result setValue:[self values] forKey:@"values"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.values = [dictionary objectForKey:@"values"];
    return self;
}
 @end
@implementation KeyValue
-(id) initWithKey:(NSString*) key
      value:(NSString*)value { 
     self.key = key;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation DescribedNoticeContacts
-(id) initWithReferenceId:(NSNumber*) referenceId
      referenceType:(NSNumber*)referenceType { 
     self.referenceId = referenceId;               
     self.referenceType = referenceType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self referenceId])
    {
        [result setValue:[self referenceId] forKey:@"referenceId"];
    }
    if([self referenceType])
    {
        [result setValue:[self referenceType] forKey:@"referenceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.referenceId = [dictionary objectForKey:@"referenceId"];
    self.referenceType = [dictionary objectForKey:@"referenceType"];
    return self;
}
 @end
@implementation DataPoint
-(id) initWithTimestamp:(NSNumber*) timestamp
      value:(NSObject*)value { 
     self.timestamp = timestamp;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self timestamp])
    {
        [result setValue:[self timestamp] forKey:@"timestamp"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.timestamp = [dictionary objectForKey:@"timestamp"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation Metric
-(id) initWithAggregator:(NSString*) aggregator
      calculateUnit:(NSString*)calculateUnit
      metricValue:(NSString*)metricValue
      metricName:(NSString*)metricName
      period:(NSString*)period { 
     self.aggregator = aggregator;               
     self.calculateUnit = calculateUnit;               
     self.metricValue = metricValue;               
     self.metricName = metricName;               
     self.period = period;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregator])
    {
        [result setValue:[self aggregator] forKey:@"aggregator"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self metricValue])
    {
        [result setValue:[self metricValue] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregator = [dictionary objectForKey:@"aggregator"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.metricValue = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.period = [dictionary objectForKey:@"period"];
    return self;
}
 @end
@implementation Tag
-(id) initWithTagKey:(NSString*) tagKey
      tagValue:(NSString*)tagValue { 
     self.tagKey = tagKey;               
     self.tagValue = tagValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self tagKey])
    {
        [result setValue:[self tagKey] forKey:@"tagKey"];
    }
    if([self tagValue])
    {
        [result setValue:[self tagValue] forKey:@"tagValue"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.tagKey = [dictionary objectForKey:@"tagKey"];
    self.tagValue = [dictionary objectForKey:@"tagValue"];
    return self;
}
 @end
@implementation ProbeTaskEnableSpec
-(id) initWithEnabled:(NSNumber*) enabled
      taskId:(NSArray<NSString*>*)taskId { 
     self.enabled = enabled;               
     self.taskId = taskId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self taskId])
    {
        [result setValue:[self taskId] forKey:@"taskId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.taskId = [dictionary objectForKey:@"taskId"];
    return self;
}
 @end
@implementation Event
-(id) initWithProbeResult:(NSNumber*) probeResult
      probeStatus:(NSNumber*)probeStatus
      timestamp:(NSNumber*)timestamp { 
     self.probeResult = probeResult;               
     self.probeStatus = probeStatus;               
     self.timestamp = timestamp;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self probeResult])
    {
        [result setValue:[self probeResult] forKey:@"probeResult"];
    }
    if([self probeStatus])
    {
        [result setValue:[self probeStatus] forKey:@"probeStatus"];
    }
    if([self timestamp])
    {
        [result setValue:[self timestamp] forKey:@"timestamp"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.probeResult = [dictionary objectForKey:@"probeResult"];
    self.probeStatus = [dictionary objectForKey:@"probeStatus"];
    self.timestamp = [dictionary objectForKey:@"timestamp"];
    return self;
}
 @end
@implementation ProbeInfo
-(id) initWithName:(NSString*) name
      privateIp:(NSString*)privateIp
      probeResult:(NSNumber*)probeResult
      probeStatus:(NSNumber*)probeStatus
      publicIp:(NSString*)publicIp
      targetStatus:(NSNumber*)targetStatus
      uuid:(NSString*)uuid
      vmStatus:(NSString*)vmStatus { 
     self.name = name;               
     self.privateIp = privateIp;               
     self.probeResult = probeResult;               
     self.probeStatus = probeStatus;               
     self.publicIp = publicIp;               
     self.targetStatus = targetStatus;               
     self.uuid = uuid;               
     self.vmStatus = vmStatus;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self privateIp])
    {
        [result setValue:[self privateIp] forKey:@"privateIp"];
    }
    if([self probeResult])
    {
        [result setValue:[self probeResult] forKey:@"probeResult"];
    }
    if([self probeStatus])
    {
        [result setValue:[self probeStatus] forKey:@"probeStatus"];
    }
    if([self publicIp])
    {
        [result setValue:[self publicIp] forKey:@"publicIp"];
    }
    if([self targetStatus])
    {
        [result setValue:[self targetStatus] forKey:@"targetStatus"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self vmStatus])
    {
        [result setValue:[self vmStatus] forKey:@"vmStatus"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.privateIp = [dictionary objectForKey:@"privateIp"];
    self.probeResult = [dictionary objectForKey:@"probeResult"];
    self.probeStatus = [dictionary objectForKey:@"probeStatus"];
    self.publicIp = [dictionary objectForKey:@"publicIp"];
    self.targetStatus = [dictionary objectForKey:@"targetStatus"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.vmStatus = [dictionary objectForKey:@"vmStatus"];
    return self;
}
 @end
@implementation WebHookOption
-(id) initWithWebHookContent:(NSString*) webHookContent
      webHookProtocol:(NSString*)webHookProtocol
      webHookSecret:(NSString*)webHookSecret
      webHookUrl:(NSString*)webHookUrl { 
     self.webHookContent = webHookContent;               
     self.webHookProtocol = webHookProtocol;               
     self.webHookSecret = webHookSecret;               
     self.webHookUrl = webHookUrl;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self webHookContent])
    {
        [result setValue:[self webHookContent] forKey:@"webHookContent"];
    }
    if([self webHookProtocol])
    {
        [result setValue:[self webHookProtocol] forKey:@"webHookProtocol"];
    }
    if([self webHookSecret])
    {
        [result setValue:[self webHookSecret] forKey:@"webHookSecret"];
    }
    if([self webHookUrl])
    {
        [result setValue:[self webHookUrl] forKey:@"webHookUrl"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.webHookContent = [dictionary objectForKey:@"webHookContent"];
    self.webHookProtocol = [dictionary objectForKey:@"webHookProtocol"];
    self.webHookSecret = [dictionary objectForKey:@"webHookSecret"];
    self.webHookUrl = [dictionary objectForKey:@"webHookUrl"];
    return self;
}
 @end
@implementation NoticeOption
-(id) initWithEffectiveIntervalEnd:(NSString*) effectiveIntervalEnd
      effectiveIntervalStart:(NSString*)effectiveIntervalStart
      noticeCondition:(NSArray<NSNumber*>*)noticeCondition
      noticePeriod:(NSNumber*)noticePeriod
      noticeWay:(NSArray<NSNumber*>*)noticeWay { 
     self.effectiveIntervalEnd = effectiveIntervalEnd;               
     self.effectiveIntervalStart = effectiveIntervalStart;               
     self.noticeCondition = noticeCondition;               
     self.noticePeriod = noticePeriod;               
     self.noticeWay = noticeWay;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self effectiveIntervalEnd])
    {
        [result setValue:[self effectiveIntervalEnd] forKey:@"effectiveIntervalEnd"];
    }
    if([self effectiveIntervalStart])
    {
        [result setValue:[self effectiveIntervalStart] forKey:@"effectiveIntervalStart"];
    }
    if([self noticeCondition])
    {
        [result setValue:[self noticeCondition] forKey:@"noticeCondition"];
    }
    if([self noticePeriod])
    {
        [result setValue:[self noticePeriod] forKey:@"noticePeriod"];
    }
    if([self noticeWay])
    {
        [result setValue:[self noticeWay] forKey:@"noticeWay"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.effectiveIntervalEnd = [dictionary objectForKey:@"effectiveIntervalEnd"];
    self.effectiveIntervalStart = [dictionary objectForKey:@"effectiveIntervalStart"];
    self.noticeCondition = [dictionary objectForKey:@"noticeCondition"];
    self.noticePeriod = [dictionary objectForKey:@"noticePeriod"];
    self.noticeWay = [dictionary objectForKey:@"noticeWay"];
    return self;
}
 @end
@implementation BaseContact
-(id) initWithReferenceId:(NSNumber*) referenceId
      referenceType:(NSNumber*)referenceType { 
     self.referenceId = referenceId;               
     self.referenceType = referenceType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self referenceId])
    {
        [result setValue:[self referenceId] forKey:@"referenceId"];
    }
    if([self referenceType])
    {
        [result setValue:[self referenceType] forKey:@"referenceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.referenceId = [dictionary objectForKey:@"referenceId"];
    self.referenceType = [dictionary objectForKey:@"referenceType"];
    return self;
}
 @end
@implementation Probe
-(id) initWithPrivateIp:(NSString*) privateIp
      publicIp:(NSString*)publicIp
      region:(NSString*)region
      uuid:(NSString*)uuid { 
     self.privateIp = privateIp;               
     self.publicIp = publicIp;               
     self.region = region;               
     self.uuid = uuid;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self privateIp])
    {
        [result setValue:[self privateIp] forKey:@"privateIp"];
    }
    if([self publicIp])
    {
        [result setValue:[self publicIp] forKey:@"publicIp"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.privateIp = [dictionary objectForKey:@"privateIp"];
    self.publicIp = [dictionary objectForKey:@"publicIp"];
    self.region = [dictionary objectForKey:@"region"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
}
 @end
@implementation EnableSiteMonitorReqItem
-(id) initWithEnabled:(NSString*) enabled
      idValue:(NSString*)idValue { 
     self.enabled = enabled;               
     self.idValue = idValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.idValue = [dictionary objectForKey:@"id"];
    return self;
}
 @end
@implementation Resource
-(id) initWithName:(NSString*) name
      regionId:(NSString*)regionId
      resourceId:(NSString*)resourceId { 
     self.name = name;               
     self.regionId = regionId;               
     self.resourceId = resourceId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self regionId])
    {
        [result setValue:[self regionId] forKey:@"regionId"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.regionId = [dictionary objectForKey:@"regionId"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    return self;
}
 @end
@implementation RuleMetricDetail
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      dimension:(NSString*)dimension
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      product:(NSString*)product
      serviceCode:(NSString*)serviceCode { 
     self.calculateUnit = calculateUnit;               
     self.dimension = dimension;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.product = product;               
     self.serviceCode = serviceCode;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self serviceCode])
    {
        [result setValue:[self serviceCode] forKey:@"serviceCode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.product = [dictionary objectForKey:@"product"];
    self.serviceCode = [dictionary objectForKey:@"serviceCode"];
    return self;
}
 @end
@implementation AgentStatus
-(id) initWithUuid:(NSString*) uuid
      value:(NSNumber*)value { 
     self.uuid = uuid;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation Err
-(id) initWithCode:(NSNumber*) code
      details:(NSObject*)details
      message:(NSString*)message
      status:(NSString*)status { 
     self.code = code;               
     self.details = details;               
     self.message = message;               
     self.status = status;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self details])
    {
        [result setValue:[self details] forKey:@"details"];
    }
    if([self message])
    {
        [result setValue:[self message] forKey:@"message"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.details = [dictionary objectForKey:@"details"];
    self.message = [dictionary objectForKey:@"message"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
}
 @end
@implementation NoticeReceiver
-(id) initWithEmail:(NSString*) email
      mobile:(NSString*)mobile
      personId:(NSNumber*)personId
      pin:(NSString*)pin
      userName:(NSString*)userName { 
     self.email = email;               
     self.mobile = mobile;               
     self.personId = personId;               
     self.pin = pin;               
     self.userName = userName;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self email])
    {
        [result setValue:[self email] forKey:@"email"];
    }
    if([self mobile])
    {
        [result setValue:[self mobile] forKey:@"mobile"];
    }
    if([self personId])
    {
        [result setValue:[self personId] forKey:@"personId"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self userName])
    {
        [result setValue:[self userName] forKey:@"userName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.email = [dictionary objectForKey:@"email"];
    self.mobile = [dictionary objectForKey:@"mobile"];
    self.personId = [dictionary objectForKey:@"personId"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.userName = [dictionary objectForKey:@"userName"];
    return self;
}
 @end
@implementation UpdateWebHookSpec
-(id) initWithActive:(NSNumber*) active
      content:(NSString*)content
      protocol:(NSString*)protocol
      secret:(NSString*)secret
      url:(NSString*)url { 
     self.active = active;               
     self.content = content;               
     self.protocol = protocol;               
     self.secret = secret;               
     self.url = url;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self active])
    {
        [result setValue:[self active] forKey:@"active"];
    }
    if([self content])
    {
        [result setValue:[self content] forKey:@"content"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self secret])
    {
        [result setValue:[self secret] forKey:@"secret"];
    }
    if([self url])
    {
        [result setValue:[self url] forKey:@"url"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.active = [dictionary objectForKey:@"active"];
    self.content = [dictionary objectForKey:@"content"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.secret = [dictionary objectForKey:@"secret"];
    self.url = [dictionary objectForKey:@"url"];
    return self;
}
 @end
@implementation TasksInfo
-(id) initWithConfType:(NSString*) confType
      confUID:(NSString*)confUID
      content:(NSObject*)content
      interval:(NSNumber*)interval
      meta:(NSMutableDictionary<NSString*,NSString*>*)meta { 
     self.confType = confType;               
     self.confUID = confUID;               
     self.content = content;               
     self.interval = interval;               
     self.meta = meta;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self confType])
    {
        [result setValue:[self confType] forKey:@"confType"];
    }
    if([self confUID])
    {
        [result setValue:[self confUID] forKey:@"confUID"];
    }
    if([self content])
    {
        [result setValue:[self content] forKey:@"content"];
    }
    if([self interval])
    {
        [result setValue:[self interval] forKey:@"interval"];
    }
    if([self meta])
    {
        [result setValue:[self meta] forKey:@"meta"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.confType = [dictionary objectForKey:@"confType"];
    self.confUID = [dictionary objectForKey:@"confUID"];
    self.content = [dictionary objectForKey:@"content"];
    self.interval = [dictionary objectForKey:@"interval"];
    self.meta = [dictionary objectForKey:@"meta"];
    return self;
}
 @end
@implementation TaskInfo
-(id) initWithAbnormalCount:(NSNumber*) abnormalCount
      address:(NSString*)address
      deleted:(NSNumber*)deleted
      enabled:(NSNumber*)enabled
      name:(NSString*)name
      probeAvailability:(NSNumber*)probeAvailability
      probeCount:(NSNumber*)probeCount
      probeType:(NSNumber*)probeType
      responseTime:(NSNumber*)responseTime
      taskId:(NSString*)taskId { 
     self.abnormalCount = abnormalCount;               
     self.address = address;               
     self.deleted = deleted;               
     self.enabled = enabled;               
     self.name = name;               
     self.probeAvailability = probeAvailability;               
     self.probeCount = probeCount;               
     self.probeType = probeType;               
     self.responseTime = responseTime;               
     self.taskId = taskId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self abnormalCount])
    {
        [result setValue:[self abnormalCount] forKey:@"abnormalCount"];
    }
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self deleted])
    {
        [result setValue:[self deleted] forKey:@"deleted"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self probeAvailability])
    {
        [result setValue:[self probeAvailability] forKey:@"probeAvailability"];
    }
    if([self probeCount])
    {
        [result setValue:[self probeCount] forKey:@"probeCount"];
    }
    if([self probeType])
    {
        [result setValue:[self probeType] forKey:@"probeType"];
    }
    if([self responseTime])
    {
        [result setValue:[self responseTime] forKey:@"responseTime"];
    }
    if([self taskId])
    {
        [result setValue:[self taskId] forKey:@"taskId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.abnormalCount = [dictionary objectForKey:@"abnormalCount"];
    self.address = [dictionary objectForKey:@"address"];
    self.deleted = [dictionary objectForKey:@"deleted"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.name = [dictionary objectForKey:@"name"];
    self.probeAvailability = [dictionary objectForKey:@"probeAvailability"];
    self.probeCount = [dictionary objectForKey:@"probeCount"];
    self.probeType = [dictionary objectForKey:@"probeType"];
    self.responseTime = [dictionary objectForKey:@"responseTime"];
    self.taskId = [dictionary objectForKey:@"taskId"];
    return self;
}
 @end
@implementation TagsOption
-(id) initWithOperator:(NSString*) operatorValue
      tags:(NSArray<DetectionTagFilter*>*)tags { 
     self.operatorValue = operatorValue;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self operatorValue])
    {
        [result setValue:[self operatorValue] forKey:@"operator"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            DetectionTagFilter* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.operatorValue = [dictionary objectForKey:@"operator"];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            DetectionTagFilter* item = [[DetectionTagFilter alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation BasicRuleDetail
-(id) initWithCalculateUnit:(NSString*) calculateUnit
      calculation:(NSString*)calculation
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      noticeLevel:(NoticeLevel*)noticeLevel
      operation:(NSString*)operation
      period:(NSNumber*)period
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.calculateUnit = calculateUnit;               
     self.calculation = calculation;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.noticeLevel = noticeLevel;               
     self.operation = operation;               
     self.period = period;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation IspLocation
-(id) initWithSisp:(NSString*) sisp
      sispName:(NSString*)sispName
      slocs:(NSArray<Location*>*)slocs { 
     self.sisp = sisp;               
     self.sispName = sispName;               
     self.slocs = slocs;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self sisp])
    {
        [result setValue:[self sisp] forKey:@"sisp"];
    }
    if([self sispName])
    {
        [result setValue:[self sispName] forKey:@"sispName"];
    }
    if([self slocs])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self slocs] count]; i++) {
            Location* item = [[self slocs] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"slocs"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.sisp = [dictionary objectForKey:@"sisp"];
    self.sispName = [dictionary objectForKey:@"sispName"];
    NSArray* slocsArray = [dictionary objectForKey:@"slocs"];
    if(slocsArray&&![slocsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [slocsArray count];i++)
        {
            Location* item = [[Location alloc]initWithDic:[slocsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.slocs = propertyArray;
    }
    return self;
}
 @end
@implementation TestSiteMonitorSpec
-(id) initWithAddress:(NSString*) address
      advanceChecked:(NSString*)advanceChecked
      createdTime:(NSNumber*)createdTime
      cycle:(NSNumber*)cycle
      defaultSource:(NSString*)defaultSource
      dnsOption:(SiteMonitorDnsOption*)dnsOption
      enabled:(NSString*)enabled
      ftpOption:(SiteMonitorFtpOption*)ftpOption
      hawkeyeId:(NSNumber*)hawkeyeId
      httpOption:(SiteMonitorHttpOption*)httpOption
      idValue:(NSString*)idValue
      isDeleted:(NSString*)isDeleted
      name:(NSString*)name
      pin:(NSString*)pin
      pingOption:(SiteMonitorPingOption*)pingOption
      pop3Option:(SiteMonitorPop3Option*)pop3Option
      port:(NSString*)port
      smtpOption:(SiteMonitorSmtpOption*)smtpOption
      source:(NSArray<SiteMonitorSource*>*)source
      stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
      taskType:(NSString*)taskType
      tcpOption:(SiteMonitorTcpOption*)tcpOption
      udpOption:(SiteMonitorUdpOption*)udpOption
      updatedTime:(NSNumber*)updatedTime { 
     self.address = address;               
     self.advanceChecked = advanceChecked;               
     self.createdTime = createdTime;               
     self.cycle = cycle;               
     self.defaultSource = defaultSource;               
     self.dnsOption = dnsOption;               
     self.enabled = enabled;               
     self.ftpOption = ftpOption;               
     self.hawkeyeId = hawkeyeId;               
     self.httpOption = httpOption;               
     self.idValue = idValue;               
     self.isDeleted = isDeleted;               
     self.name = name;               
     self.pin = pin;               
     self.pingOption = pingOption;               
     self.pop3Option = pop3Option;               
     self.port = port;               
     self.smtpOption = smtpOption;               
     self.source = source;               
     self.stats = stats;               
     self.taskType = taskType;               
     self.tcpOption = tcpOption;               
     self.udpOption = udpOption;               
     self.updatedTime = updatedTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self advanceChecked])
    {
        [result setValue:[self advanceChecked] forKey:@"advanceChecked"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self cycle])
    {
        [result setValue:[self cycle] forKey:@"cycle"];
    }
    if([self defaultSource])
    {
        [result setValue:[self defaultSource] forKey:@"defaultSource"];
    }
    if([self dnsOption])
    {
        [result setValue:[[self dnsOption] dictionary]forKey:@"dnsOption"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self ftpOption])
    {
        [result setValue:[[self ftpOption] dictionary]forKey:@"ftpOption"];
    }
    if([self hawkeyeId])
    {
        [result setValue:[self hawkeyeId] forKey:@"hawkeyeId"];
    }
    if([self httpOption])
    {
        [result setValue:[[self httpOption] dictionary]forKey:@"httpOption"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self isDeleted])
    {
        [result setValue:[self isDeleted] forKey:@"isDeleted"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self pingOption])
    {
        [result setValue:[[self pingOption] dictionary]forKey:@"pingOption"];
    }
    if([self pop3Option])
    {
        [result setValue:[[self pop3Option] dictionary]forKey:@"pop3Option"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self smtpOption])
    {
        [result setValue:[[self smtpOption] dictionary]forKey:@"smtpOption"];
    }
    if([self source])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self source] count]; i++) {
            SiteMonitorSource* item = [[self source] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"source"];
    }
    if([self stats])
    {
        [result setValue:[self stats] forKey:@"stats"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self tcpOption])
    {
        [result setValue:[[self tcpOption] dictionary]forKey:@"tcpOption"];
    }
    if([self udpOption])
    {
        [result setValue:[[self udpOption] dictionary]forKey:@"udpOption"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.advanceChecked = [dictionary objectForKey:@"advanceChecked"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.cycle = [dictionary objectForKey:@"cycle"];
    self.defaultSource = [dictionary objectForKey:@"defaultSource"];
    self.dnsOption = [[SiteMonitorDnsOption alloc]initWithDic:[dictionary objectForKey:@"dnsOption"]];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.ftpOption = [[SiteMonitorFtpOption alloc]initWithDic:[dictionary objectForKey:@"ftpOption"]];
    self.hawkeyeId = [dictionary objectForKey:@"hawkeyeId"];
    self.httpOption = [[SiteMonitorHttpOption alloc]initWithDic:[dictionary objectForKey:@"httpOption"]];
    self.idValue = [dictionary objectForKey:@"id"];
    self.isDeleted = [dictionary objectForKey:@"isDeleted"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.pingOption = [[SiteMonitorPingOption alloc]initWithDic:[dictionary objectForKey:@"pingOption"]];
    self.pop3Option = [[SiteMonitorPop3Option alloc]initWithDic:[dictionary objectForKey:@"pop3Option"]];
    self.port = [dictionary objectForKey:@"port"];
    self.smtpOption = [[SiteMonitorSmtpOption alloc]initWithDic:[dictionary objectForKey:@"smtpOption"]];
    NSArray* sourceArray = [dictionary objectForKey:@"source"];
    if(sourceArray&&![sourceArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sourceArray count];i++)
        {
            SiteMonitorSource* item = [[SiteMonitorSource alloc]initWithDic:[sourceArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.source = propertyArray;
    }
    self.stats = [dictionary objectForKey:@"stats"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.tcpOption = [[SiteMonitorTcpOption alloc]initWithDic:[dictionary objectForKey:@"tcpOption"]];
    self.udpOption = [[SiteMonitorUdpOption alloc]initWithDic:[dictionary objectForKey:@"udpOption"]];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
}
 @end
@implementation SiteMonitor
-(id) initWithAddress:(NSString*) address
      advanceChecked:(NSString*)advanceChecked
      createdTime:(NSNumber*)createdTime
      cycle:(NSNumber*)cycle
      defaultSource:(NSString*)defaultSource
      dnsOption:(SiteMonitorDnsOption*)dnsOption
      enabled:(NSString*)enabled
      ftpOption:(SiteMonitorFtpOption*)ftpOption
      hawkeyeId:(NSNumber*)hawkeyeId
      httpOption:(SiteMonitorHttpOption*)httpOption
      idValue:(NSString*)idValue
      isDeleted:(NSString*)isDeleted
      name:(NSString*)name
      pin:(NSString*)pin
      pingOption:(SiteMonitorPingOption*)pingOption
      pop3Option:(SiteMonitorPop3Option*)pop3Option
      port:(NSString*)port
      smtpOption:(SiteMonitorSmtpOption*)smtpOption
      source:(NSArray<SiteMonitorSource*>*)source
      stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
      taskType:(NSString*)taskType
      tcpOption:(SiteMonitorTcpOption*)tcpOption
      udpOption:(SiteMonitorUdpOption*)udpOption
      updatedTime:(NSNumber*)updatedTime { 
     self.address = address;               
     self.advanceChecked = advanceChecked;               
     self.createdTime = createdTime;               
     self.cycle = cycle;               
     self.defaultSource = defaultSource;               
     self.dnsOption = dnsOption;               
     self.enabled = enabled;               
     self.ftpOption = ftpOption;               
     self.hawkeyeId = hawkeyeId;               
     self.httpOption = httpOption;               
     self.idValue = idValue;               
     self.isDeleted = isDeleted;               
     self.name = name;               
     self.pin = pin;               
     self.pingOption = pingOption;               
     self.pop3Option = pop3Option;               
     self.port = port;               
     self.smtpOption = smtpOption;               
     self.source = source;               
     self.stats = stats;               
     self.taskType = taskType;               
     self.tcpOption = tcpOption;               
     self.udpOption = udpOption;               
     self.updatedTime = updatedTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self advanceChecked])
    {
        [result setValue:[self advanceChecked] forKey:@"advanceChecked"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self cycle])
    {
        [result setValue:[self cycle] forKey:@"cycle"];
    }
    if([self defaultSource])
    {
        [result setValue:[self defaultSource] forKey:@"defaultSource"];
    }
    if([self dnsOption])
    {
        [result setValue:[[self dnsOption] dictionary]forKey:@"dnsOption"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self ftpOption])
    {
        [result setValue:[[self ftpOption] dictionary]forKey:@"ftpOption"];
    }
    if([self hawkeyeId])
    {
        [result setValue:[self hawkeyeId] forKey:@"hawkeyeId"];
    }
    if([self httpOption])
    {
        [result setValue:[[self httpOption] dictionary]forKey:@"httpOption"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self isDeleted])
    {
        [result setValue:[self isDeleted] forKey:@"isDeleted"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self pingOption])
    {
        [result setValue:[[self pingOption] dictionary]forKey:@"pingOption"];
    }
    if([self pop3Option])
    {
        [result setValue:[[self pop3Option] dictionary]forKey:@"pop3Option"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self smtpOption])
    {
        [result setValue:[[self smtpOption] dictionary]forKey:@"smtpOption"];
    }
    if([self source])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self source] count]; i++) {
            SiteMonitorSource* item = [[self source] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"source"];
    }
    if([self stats])
    {
        [result setValue:[self stats] forKey:@"stats"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self tcpOption])
    {
        [result setValue:[[self tcpOption] dictionary]forKey:@"tcpOption"];
    }
    if([self udpOption])
    {
        [result setValue:[[self udpOption] dictionary]forKey:@"udpOption"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.advanceChecked = [dictionary objectForKey:@"advanceChecked"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.cycle = [dictionary objectForKey:@"cycle"];
    self.defaultSource = [dictionary objectForKey:@"defaultSource"];
    self.dnsOption = [[SiteMonitorDnsOption alloc]initWithDic:[dictionary objectForKey:@"dnsOption"]];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.ftpOption = [[SiteMonitorFtpOption alloc]initWithDic:[dictionary objectForKey:@"ftpOption"]];
    self.hawkeyeId = [dictionary objectForKey:@"hawkeyeId"];
    self.httpOption = [[SiteMonitorHttpOption alloc]initWithDic:[dictionary objectForKey:@"httpOption"]];
    self.idValue = [dictionary objectForKey:@"id"];
    self.isDeleted = [dictionary objectForKey:@"isDeleted"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.pingOption = [[SiteMonitorPingOption alloc]initWithDic:[dictionary objectForKey:@"pingOption"]];
    self.pop3Option = [[SiteMonitorPop3Option alloc]initWithDic:[dictionary objectForKey:@"pop3Option"]];
    self.port = [dictionary objectForKey:@"port"];
    self.smtpOption = [[SiteMonitorSmtpOption alloc]initWithDic:[dictionary objectForKey:@"smtpOption"]];
    NSArray* sourceArray = [dictionary objectForKey:@"source"];
    if(sourceArray&&![sourceArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sourceArray count];i++)
        {
            SiteMonitorSource* item = [[SiteMonitorSource alloc]initWithDic:[sourceArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.source = propertyArray;
    }
    self.stats = [dictionary objectForKey:@"stats"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.tcpOption = [[SiteMonitorTcpOption alloc]initWithDic:[dictionary objectForKey:@"tcpOption"]];
    self.udpOption = [[SiteMonitorUdpOption alloc]initWithDic:[dictionary objectForKey:@"udpOption"]];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
}
 @end
@implementation MetricData
-(id) initWithData:(NSArray<DataPoint*>*) data
      metric:(Metric*)metric
      tags:(NSArray<Tag*>*)tags { 
     self.data = data;               
     self.metric = metric;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self data])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self data] count]; i++) {
            DataPoint* item = [[self data] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"data"];
    }
    if([self metric])
    {
        [result setValue:[[self metric] dictionary]forKey:@"metric"];
    }
    if([self tags])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self tags] count]; i++) {
            Tag* item = [[self tags] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dataArray = [dictionary objectForKey:@"data"];
    if(dataArray&&![dataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dataArray count];i++)
        {
            DataPoint* item = [[DataPoint alloc]initWithDic:[dataArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.data = propertyArray;
    }
    self.metric = [[Metric alloc]initWithDic:[dictionary objectForKey:@"metric"]];
    NSArray* tagsArray = [dictionary objectForKey:@"tags"];
    if(tagsArray&&![tagsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagsArray count];i++)
        {
            Tag* item = [[Tag alloc]initWithDic:[tagsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.tags = propertyArray;
    }
    return self;
}
 @end
@implementation BasicRule
-(id) initWithCalculation:(NSString*) calculation
      downSample:(NSString*)downSample
      metric:(NSString*)metric
      noticeLevel:(NoticeLevel*)noticeLevel
      operation:(NSString*)operation
      period:(NSNumber*)period
      threshold:(NSNumber*)threshold
      times:(NSNumber*)times { 
     self.calculation = calculation;               
     self.downSample = downSample;               
     self.metric = metric;               
     self.noticeLevel = noticeLevel;               
     self.operation = operation;               
     self.period = period;               
     self.threshold = threshold;               
     self.times = times;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self calculation])
    {
        [result setValue:[self calculation] forKey:@"calculation"];
    }
    if([self downSample])
    {
        [result setValue:[self downSample] forKey:@"downSample"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self noticeLevel])
    {
        [result setValue:[[self noticeLevel] dictionary]forKey:@"noticeLevel"];
    }
    if([self operation])
    {
        [result setValue:[self operation] forKey:@"operation"];
    }
    if([self period])
    {
        [result setValue:[self period] forKey:@"period"];
    }
    if([self threshold])
    {
        [result setValue:[self threshold] forKey:@"threshold"];
    }
    if([self times])
    {
        [result setValue:[self times] forKey:@"times"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.calculation = [dictionary objectForKey:@"calculation"];
    self.downSample = [dictionary objectForKey:@"downSample"];
    self.metric = [dictionary objectForKey:@"metric"];
    self.noticeLevel = [[NoticeLevel alloc]initWithDic:[dictionary objectForKey:@"noticeLevel"]];
    self.operation = [dictionary objectForKey:@"operation"];
    self.period = [dictionary objectForKey:@"period"];
    self.threshold = [dictionary objectForKey:@"threshold"];
    self.times = [dictionary objectForKey:@"times"];
    return self;
}
 @end
@implementation CreateProbeTaskParam
-(id) initWithAddress:(NSString*) address
      httpBody:(NSString*)httpBody
      httpCookie:(NSArray<KeyValue*>*)httpCookie
      httpHeader:(NSArray<KeyValue*>*)httpHeader
      httpType:(NSNumber*)httpType
      name:(NSString*)name
      port:(NSNumber*)port
      probeType:(NSNumber*)probeType
      probes:(NSArray<Probe*>*)probes
      targetId:(NSString*)targetId
      targetRegion:(NSString*)targetRegion
      taskType:(NSNumber*)taskType { 
     self.address = address;               
     self.httpBody = httpBody;               
     self.httpCookie = httpCookie;               
     self.httpHeader = httpHeader;               
     self.httpType = httpType;               
     self.name = name;               
     self.port = port;               
     self.probeType = probeType;               
     self.probes = probes;               
     self.targetId = targetId;               
     self.targetRegion = targetRegion;               
     self.taskType = taskType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self httpBody])
    {
        [result setValue:[self httpBody] forKey:@"httpBody"];
    }
    if([self httpCookie])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self httpCookie] count]; i++) {
            KeyValue* item = [[self httpCookie] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpCookie"];
    }
    if([self httpHeader])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self httpHeader] count]; i++) {
            KeyValue* item = [[self httpHeader] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpHeader"];
    }
    if([self httpType])
    {
        [result setValue:[self httpType] forKey:@"httpType"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self probeType])
    {
        [result setValue:[self probeType] forKey:@"probeType"];
    }
    if([self probes])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self probes] count]; i++) {
            Probe* item = [[self probes] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"probes"];
    }
    if([self targetId])
    {
        [result setValue:[self targetId] forKey:@"targetId"];
    }
    if([self targetRegion])
    {
        [result setValue:[self targetRegion] forKey:@"targetRegion"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.httpBody = [dictionary objectForKey:@"httpBody"];
    NSArray* httpCookieArray = [dictionary objectForKey:@"httpCookie"];
    if(httpCookieArray&&![httpCookieArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpCookieArray count];i++)
        {
            KeyValue* item = [[KeyValue alloc]initWithDic:[httpCookieArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.httpCookie = propertyArray;
    }
    NSArray* httpHeaderArray = [dictionary objectForKey:@"httpHeader"];
    if(httpHeaderArray&&![httpHeaderArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpHeaderArray count];i++)
        {
            KeyValue* item = [[KeyValue alloc]initWithDic:[httpHeaderArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.httpHeader = propertyArray;
    }
    self.httpType = [dictionary objectForKey:@"httpType"];
    self.name = [dictionary objectForKey:@"name"];
    self.port = [dictionary objectForKey:@"port"];
    self.probeType = [dictionary objectForKey:@"probeType"];
    NSArray* probesArray = [dictionary objectForKey:@"probes"];
    if(probesArray&&![probesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [probesArray count];i++)
        {
            Probe* item = [[Probe alloc]initWithDic:[probesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.probes = propertyArray;
    }
    self.targetId = [dictionary objectForKey:@"targetId"];
    self.targetRegion = [dictionary objectForKey:@"targetRegion"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    return self;
}
 @end
@implementation CreateProbeTaskSpec
-(id) initWithClientToken:(NSString*) clientToken
      createProbeTaskSpecValue:(CreateProbeTaskParam*)createProbeTaskSpecValue { 
     self.clientToken = clientToken;               
     self.createProbeTaskSpecValue = createProbeTaskSpecValue;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self clientToken])
    {
        [result setValue:[self clientToken] forKey:@"clientToken"];
    }
    if([self createProbeTaskSpecValue])
    {
        [result setValue:[[self createProbeTaskSpecValue] dictionary]forKey:@"createProbeTaskSpec"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientToken = [dictionary objectForKey:@"clientToken"];
    self.createProbeTaskSpecValue = [[CreateProbeTaskParam alloc]initWithDic:[dictionary objectForKey:@"createProbeTaskSpec"]];
    return self;
}
 @end
@implementation UpdateSiteMonitorSpec
-(id) initWithAddress:(NSString*) address
      advanceChecked:(NSString*)advanceChecked
      createdTime:(NSNumber*)createdTime
      cycle:(NSNumber*)cycle
      defaultSource:(NSString*)defaultSource
      dnsOption:(SiteMonitorDnsOption*)dnsOption
      enabled:(NSString*)enabled
      ftpOption:(SiteMonitorFtpOption*)ftpOption
      hawkeyeId:(NSNumber*)hawkeyeId
      httpOption:(SiteMonitorHttpOption*)httpOption
      idValue:(NSString*)idValue
      isDeleted:(NSString*)isDeleted
      name:(NSString*)name
      pin:(NSString*)pin
      pingOption:(SiteMonitorPingOption*)pingOption
      pop3Option:(SiteMonitorPop3Option*)pop3Option
      port:(NSString*)port
      smtpOption:(SiteMonitorSmtpOption*)smtpOption
      source:(NSArray<SiteMonitorSource*>*)source
      stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
      taskType:(NSString*)taskType
      tcpOption:(SiteMonitorTcpOption*)tcpOption
      udpOption:(SiteMonitorUdpOption*)udpOption
      updatedTime:(NSNumber*)updatedTime { 
     self.address = address;               
     self.advanceChecked = advanceChecked;               
     self.createdTime = createdTime;               
     self.cycle = cycle;               
     self.defaultSource = defaultSource;               
     self.dnsOption = dnsOption;               
     self.enabled = enabled;               
     self.ftpOption = ftpOption;               
     self.hawkeyeId = hawkeyeId;               
     self.httpOption = httpOption;               
     self.idValue = idValue;               
     self.isDeleted = isDeleted;               
     self.name = name;               
     self.pin = pin;               
     self.pingOption = pingOption;               
     self.pop3Option = pop3Option;               
     self.port = port;               
     self.smtpOption = smtpOption;               
     self.source = source;               
     self.stats = stats;               
     self.taskType = taskType;               
     self.tcpOption = tcpOption;               
     self.udpOption = udpOption;               
     self.updatedTime = updatedTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self advanceChecked])
    {
        [result setValue:[self advanceChecked] forKey:@"advanceChecked"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self cycle])
    {
        [result setValue:[self cycle] forKey:@"cycle"];
    }
    if([self defaultSource])
    {
        [result setValue:[self defaultSource] forKey:@"defaultSource"];
    }
    if([self dnsOption])
    {
        [result setValue:[[self dnsOption] dictionary]forKey:@"dnsOption"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self ftpOption])
    {
        [result setValue:[[self ftpOption] dictionary]forKey:@"ftpOption"];
    }
    if([self hawkeyeId])
    {
        [result setValue:[self hawkeyeId] forKey:@"hawkeyeId"];
    }
    if([self httpOption])
    {
        [result setValue:[[self httpOption] dictionary]forKey:@"httpOption"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self isDeleted])
    {
        [result setValue:[self isDeleted] forKey:@"isDeleted"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self pingOption])
    {
        [result setValue:[[self pingOption] dictionary]forKey:@"pingOption"];
    }
    if([self pop3Option])
    {
        [result setValue:[[self pop3Option] dictionary]forKey:@"pop3Option"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self smtpOption])
    {
        [result setValue:[[self smtpOption] dictionary]forKey:@"smtpOption"];
    }
    if([self source])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self source] count]; i++) {
            SiteMonitorSource* item = [[self source] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"source"];
    }
    if([self stats])
    {
        [result setValue:[self stats] forKey:@"stats"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self tcpOption])
    {
        [result setValue:[[self tcpOption] dictionary]forKey:@"tcpOption"];
    }
    if([self udpOption])
    {
        [result setValue:[[self udpOption] dictionary]forKey:@"udpOption"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.advanceChecked = [dictionary objectForKey:@"advanceChecked"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.cycle = [dictionary objectForKey:@"cycle"];
    self.defaultSource = [dictionary objectForKey:@"defaultSource"];
    self.dnsOption = [[SiteMonitorDnsOption alloc]initWithDic:[dictionary objectForKey:@"dnsOption"]];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.ftpOption = [[SiteMonitorFtpOption alloc]initWithDic:[dictionary objectForKey:@"ftpOption"]];
    self.hawkeyeId = [dictionary objectForKey:@"hawkeyeId"];
    self.httpOption = [[SiteMonitorHttpOption alloc]initWithDic:[dictionary objectForKey:@"httpOption"]];
    self.idValue = [dictionary objectForKey:@"id"];
    self.isDeleted = [dictionary objectForKey:@"isDeleted"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.pingOption = [[SiteMonitorPingOption alloc]initWithDic:[dictionary objectForKey:@"pingOption"]];
    self.pop3Option = [[SiteMonitorPop3Option alloc]initWithDic:[dictionary objectForKey:@"pop3Option"]];
    self.port = [dictionary objectForKey:@"port"];
    self.smtpOption = [[SiteMonitorSmtpOption alloc]initWithDic:[dictionary objectForKey:@"smtpOption"]];
    NSArray* sourceArray = [dictionary objectForKey:@"source"];
    if(sourceArray&&![sourceArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sourceArray count];i++)
        {
            SiteMonitorSource* item = [[SiteMonitorSource alloc]initWithDic:[sourceArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.source = propertyArray;
    }
    self.stats = [dictionary objectForKey:@"stats"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.tcpOption = [[SiteMonitorTcpOption alloc]initWithDic:[dictionary objectForKey:@"tcpOption"]];
    self.udpOption = [[SiteMonitorUdpOption alloc]initWithDic:[dictionary objectForKey:@"udpOption"]];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
}
 @end
@implementation CreateAlarmSpec
-(id) initWithAutoScalingPolicyId:(NSString*) autoScalingPolicyId
      baseContact:(NSArray<BaseContact*>*)baseContact
      clientToken:(NSString*)clientToken
      dimension:(NSString*)dimension
      enabled:(NSNumber*)enabled
      noticeOption:(NSArray<NoticeOption*>*)noticeOption
      product:(NSString*)product
      resourceOption:(ResourceOption*)resourceOption
      ruleName:(NSString*)ruleName
      ruleOption:(RuleOption*)ruleOption
      ruleType:(NSString*)ruleType
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      webHookOption:(WebHookOption*)webHookOption { 
     self.autoScalingPolicyId = autoScalingPolicyId;               
     self.baseContact = baseContact;               
     self.clientToken = clientToken;               
     self.dimension = dimension;               
     self.enabled = enabled;               
     self.noticeOption = noticeOption;               
     self.product = product;               
     self.resourceOption = resourceOption;               
     self.ruleName = ruleName;               
     self.ruleOption = ruleOption;               
     self.ruleType = ruleType;               
     self.tags = tags;               
     self.webHookOption = webHookOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self autoScalingPolicyId])
    {
        [result setValue:[self autoScalingPolicyId] forKey:@"autoScalingPolicyId"];
    }
    if([self baseContact])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self baseContact] count]; i++) {
            BaseContact* item = [[self baseContact] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"baseContact"];
    }
    if([self clientToken])
    {
        [result setValue:[self clientToken] forKey:@"clientToken"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self noticeOption])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self noticeOption] count]; i++) {
            NoticeOption* item = [[self noticeOption] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"noticeOption"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleOption])
    {
        [result setValue:[[self ruleOption] dictionary]forKey:@"ruleOption"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self webHookOption])
    {
        [result setValue:[[self webHookOption] dictionary]forKey:@"webHookOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.autoScalingPolicyId = [dictionary objectForKey:@"autoScalingPolicyId"];
    NSArray* baseContactArray = [dictionary objectForKey:@"baseContact"];
    if(baseContactArray&&![baseContactArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [baseContactArray count];i++)
        {
            BaseContact* item = [[BaseContact alloc]initWithDic:[baseContactArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.baseContact = propertyArray;
    }
    self.clientToken = [dictionary objectForKey:@"clientToken"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    NSArray* noticeOptionArray = [dictionary objectForKey:@"noticeOption"];
    if(noticeOptionArray&&![noticeOptionArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [noticeOptionArray count];i++)
        {
            NoticeOption* item = [[NoticeOption alloc]initWithDic:[noticeOptionArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.noticeOption = propertyArray;
    }
    self.product = [dictionary objectForKey:@"product"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleOption = [[RuleOption alloc]initWithDic:[dictionary objectForKey:@"ruleOption"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.webHookOption = [[WebHookOption alloc]initWithDic:[dictionary objectForKey:@"webHookOption"]];
    return self;
}
 @end
@implementation EnableSiteMonitorSpec
-(id) initWithList:(NSArray<EnableSiteMonitorReqItem*>*) list { 
     self.list = list;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self list])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self list] count]; i++) {
            EnableSiteMonitorReqItem* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
            EnableSiteMonitorReqItem* item = [[EnableSiteMonitorReqItem alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    return self;
}
 @end
@implementation CreateSiteMonitorSpec
-(id) initWithAddress:(NSString*) address
      advanceChecked:(NSString*)advanceChecked
      createdTime:(NSNumber*)createdTime
      cycle:(NSNumber*)cycle
      defaultSource:(NSString*)defaultSource
      dnsOption:(SiteMonitorDnsOption*)dnsOption
      enabled:(NSString*)enabled
      ftpOption:(SiteMonitorFtpOption*)ftpOption
      hawkeyeId:(NSNumber*)hawkeyeId
      httpOption:(SiteMonitorHttpOption*)httpOption
      idValue:(NSString*)idValue
      isDeleted:(NSString*)isDeleted
      name:(NSString*)name
      pin:(NSString*)pin
      pingOption:(SiteMonitorPingOption*)pingOption
      pop3Option:(SiteMonitorPop3Option*)pop3Option
      port:(NSString*)port
      smtpOption:(SiteMonitorSmtpOption*)smtpOption
      source:(NSArray<SiteMonitorSource*>*)source
      stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
      taskType:(NSString*)taskType
      tcpOption:(SiteMonitorTcpOption*)tcpOption
      udpOption:(SiteMonitorUdpOption*)udpOption
      updatedTime:(NSNumber*)updatedTime { 
     self.address = address;               
     self.advanceChecked = advanceChecked;               
     self.createdTime = createdTime;               
     self.cycle = cycle;               
     self.defaultSource = defaultSource;               
     self.dnsOption = dnsOption;               
     self.enabled = enabled;               
     self.ftpOption = ftpOption;               
     self.hawkeyeId = hawkeyeId;               
     self.httpOption = httpOption;               
     self.idValue = idValue;               
     self.isDeleted = isDeleted;               
     self.name = name;               
     self.pin = pin;               
     self.pingOption = pingOption;               
     self.pop3Option = pop3Option;               
     self.port = port;               
     self.smtpOption = smtpOption;               
     self.source = source;               
     self.stats = stats;               
     self.taskType = taskType;               
     self.tcpOption = tcpOption;               
     self.udpOption = udpOption;               
     self.updatedTime = updatedTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self advanceChecked])
    {
        [result setValue:[self advanceChecked] forKey:@"advanceChecked"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self cycle])
    {
        [result setValue:[self cycle] forKey:@"cycle"];
    }
    if([self defaultSource])
    {
        [result setValue:[self defaultSource] forKey:@"defaultSource"];
    }
    if([self dnsOption])
    {
        [result setValue:[[self dnsOption] dictionary]forKey:@"dnsOption"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self ftpOption])
    {
        [result setValue:[[self ftpOption] dictionary]forKey:@"ftpOption"];
    }
    if([self hawkeyeId])
    {
        [result setValue:[self hawkeyeId] forKey:@"hawkeyeId"];
    }
    if([self httpOption])
    {
        [result setValue:[[self httpOption] dictionary]forKey:@"httpOption"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self isDeleted])
    {
        [result setValue:[self isDeleted] forKey:@"isDeleted"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self pingOption])
    {
        [result setValue:[[self pingOption] dictionary]forKey:@"pingOption"];
    }
    if([self pop3Option])
    {
        [result setValue:[[self pop3Option] dictionary]forKey:@"pop3Option"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self smtpOption])
    {
        [result setValue:[[self smtpOption] dictionary]forKey:@"smtpOption"];
    }
    if([self source])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self source] count]; i++) {
            SiteMonitorSource* item = [[self source] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"source"];
    }
    if([self stats])
    {
        [result setValue:[self stats] forKey:@"stats"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self tcpOption])
    {
        [result setValue:[[self tcpOption] dictionary]forKey:@"tcpOption"];
    }
    if([self udpOption])
    {
        [result setValue:[[self udpOption] dictionary]forKey:@"udpOption"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.advanceChecked = [dictionary objectForKey:@"advanceChecked"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.cycle = [dictionary objectForKey:@"cycle"];
    self.defaultSource = [dictionary objectForKey:@"defaultSource"];
    self.dnsOption = [[SiteMonitorDnsOption alloc]initWithDic:[dictionary objectForKey:@"dnsOption"]];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.ftpOption = [[SiteMonitorFtpOption alloc]initWithDic:[dictionary objectForKey:@"ftpOption"]];
    self.hawkeyeId = [dictionary objectForKey:@"hawkeyeId"];
    self.httpOption = [[SiteMonitorHttpOption alloc]initWithDic:[dictionary objectForKey:@"httpOption"]];
    self.idValue = [dictionary objectForKey:@"id"];
    self.isDeleted = [dictionary objectForKey:@"isDeleted"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.pingOption = [[SiteMonitorPingOption alloc]initWithDic:[dictionary objectForKey:@"pingOption"]];
    self.pop3Option = [[SiteMonitorPop3Option alloc]initWithDic:[dictionary objectForKey:@"pop3Option"]];
    self.port = [dictionary objectForKey:@"port"];
    self.smtpOption = [[SiteMonitorSmtpOption alloc]initWithDic:[dictionary objectForKey:@"smtpOption"]];
    NSArray* sourceArray = [dictionary objectForKey:@"source"];
    if(sourceArray&&![sourceArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sourceArray count];i++)
        {
            SiteMonitorSource* item = [[SiteMonitorSource alloc]initWithDic:[sourceArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.source = propertyArray;
    }
    self.stats = [dictionary objectForKey:@"stats"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.tcpOption = [[SiteMonitorTcpOption alloc]initWithDic:[dictionary objectForKey:@"tcpOption"]];
    self.udpOption = [[SiteMonitorUdpOption alloc]initWithDic:[dictionary objectForKey:@"udpOption"]];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
}
 @end
@implementation StatsItem
-(id) initWithAggregateFunc:(NSString*) aggregateFunc
      aggregateIntervalMin:(NSNumber*)aggregateIntervalMin
      calculateUnit:(NSString*)calculateUnit
      dps:(NSArray<DataPoint*>*)dps
      metric:(NSString*)metric
      metricName:(NSString*)metricName
      resource:(Resource*)resource
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.aggregateFunc = aggregateFunc;               
     self.aggregateIntervalMin = aggregateIntervalMin;               
     self.calculateUnit = calculateUnit;               
     self.dps = dps;               
     self.metric = metric;               
     self.metricName = metricName;               
     self.resource = resource;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self aggregateFunc])
    {
        [result setValue:[self aggregateFunc] forKey:@"aggregateFunc"];
    }
    if([self aggregateIntervalMin])
    {
        [result setValue:[self aggregateIntervalMin] forKey:@"aggregateIntervalMin"];
    }
    if([self calculateUnit])
    {
        [result setValue:[self calculateUnit] forKey:@"calculateUnit"];
    }
    if([self dps])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self dps] count]; i++) {
            DataPoint* item = [[self dps] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dps"];
    }
    if([self metric])
    {
        [result setValue:[self metric] forKey:@"metric"];
    }
    if([self metricName])
    {
        [result setValue:[self metricName] forKey:@"metricName"];
    }
    if([self resource])
    {
        [result setValue:[[self resource] dictionary]forKey:@"resource"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.aggregateFunc = [dictionary objectForKey:@"aggregateFunc"];
    self.aggregateIntervalMin = [dictionary objectForKey:@"aggregateIntervalMin"];
    self.calculateUnit = [dictionary objectForKey:@"calculateUnit"];
    NSArray* dpsArray = [dictionary objectForKey:@"dps"];
    if(dpsArray&&![dpsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dpsArray count];i++)
        {
            DataPoint* item = [[DataPoint alloc]initWithDic:[dpsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.dps = propertyArray;
    }
    self.metric = [dictionary objectForKey:@"metric"];
    self.metricName = [dictionary objectForKey:@"metricName"];
    self.resource = [[Resource alloc]initWithDic:[dictionary objectForKey:@"resource"]];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation UpdateAlarmResourcesSpec
-(id) initWithOperatorType:(NSNumber*) operatorType
      resourceOption:(ResourceOption*)resourceOption { 
     self.operatorType = operatorType;               
     self.resourceOption = resourceOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self operatorType])
    {
        [result setValue:[self operatorType] forKey:@"operatorType"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.operatorType = [dictionary objectForKey:@"operatorType"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    return self;
}
 @end
@implementation DescribedAlarmHistory
-(id) initWithAlarmId:(NSString*) alarmId
      dimension:(NSString*)dimension
      dimensionName:(NSString*)dimensionName
      durationTimes:(NSNumber*)durationTimes
      noticeDurationTime:(NSNumber*)noticeDurationTime
      noticeLevel:(NSString*)noticeLevel
      noticeLevelTriggered:(NSString*)noticeLevelTriggered
      noticeTime:(NSString*)noticeTime
      product:(NSString*)product
      productName:(NSString*)productName
      receivers:(NSArray<NoticeReceiver*>*)receivers
      region:(NSString*)region
      resourceId:(NSString*)resourceId
      rule:(BasicRuleDetail*)rule
      ruleType:(NSString*)ruleType
      status:(NSNumber*)status
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      value:(NSNumber*)value { 
     self.alarmId = alarmId;               
     self.dimension = dimension;               
     self.dimensionName = dimensionName;               
     self.durationTimes = durationTimes;               
     self.noticeDurationTime = noticeDurationTime;               
     self.noticeLevel = noticeLevel;               
     self.noticeLevelTriggered = noticeLevelTriggered;               
     self.noticeTime = noticeTime;               
     self.product = product;               
     self.productName = productName;               
     self.receivers = receivers;               
     self.region = region;               
     self.resourceId = resourceId;               
     self.rule = rule;               
     self.ruleType = ruleType;               
     self.status = status;               
     self.tags = tags;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmId])
    {
        [result setValue:[self alarmId] forKey:@"alarmId"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self durationTimes])
    {
        [result setValue:[self durationTimes] forKey:@"durationTimes"];
    }
    if([self noticeDurationTime])
    {
        [result setValue:[self noticeDurationTime] forKey:@"noticeDurationTime"];
    }
    if([self noticeLevel])
    {
        [result setValue:[self noticeLevel] forKey:@"noticeLevel"];
    }
    if([self noticeLevelTriggered])
    {
        [result setValue:[self noticeLevelTriggered] forKey:@"noticeLevelTriggered"];
    }
    if([self noticeTime])
    {
        [result setValue:[self noticeTime] forKey:@"noticeTime"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self receivers])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self receivers] count]; i++) {
            NoticeReceiver* item = [[self receivers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"receivers"];
    }
    if([self region])
    {
        [result setValue:[self region] forKey:@"region"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self rule])
    {
        [result setValue:[[self rule] dictionary]forKey:@"rule"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmId = [dictionary objectForKey:@"alarmId"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.durationTimes = [dictionary objectForKey:@"durationTimes"];
    self.noticeDurationTime = [dictionary objectForKey:@"noticeDurationTime"];
    self.noticeLevel = [dictionary objectForKey:@"noticeLevel"];
    self.noticeLevelTriggered = [dictionary objectForKey:@"noticeLevelTriggered"];
    self.noticeTime = [dictionary objectForKey:@"noticeTime"];
    self.product = [dictionary objectForKey:@"product"];
    self.productName = [dictionary objectForKey:@"productName"];
    NSArray* receiversArray = [dictionary objectForKey:@"receivers"];
    if(receiversArray&&![receiversArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [receiversArray count];i++)
        {
            NoticeReceiver* item = [[NoticeReceiver alloc]initWithDic:[receiversArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.receivers = propertyArray;
    }
    self.region = [dictionary objectForKey:@"region"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.rule = [[BasicRuleDetail alloc]initWithDic:[dictionary objectForKey:@"rule"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.status = [dictionary objectForKey:@"status"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation UpdateProbeTaskSpec
-(id) initWithHttpBody:(NSString*) httpBody
      httpCookie:(NSArray<KeyValue*>*)httpCookie
      httpHeader:(NSArray<KeyValue*>*)httpHeader
      httpType:(NSNumber*)httpType
      name:(NSString*)name
      probes:(NSArray<Probe*>*)probes { 
     self.httpBody = httpBody;               
     self.httpCookie = httpCookie;               
     self.httpHeader = httpHeader;               
     self.httpType = httpType;               
     self.name = name;               
     self.probes = probes;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self httpBody])
    {
        [result setValue:[self httpBody] forKey:@"httpBody"];
    }
    if([self httpCookie])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self httpCookie] count]; i++) {
            KeyValue* item = [[self httpCookie] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpCookie"];
    }
    if([self httpHeader])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self httpHeader] count]; i++) {
            KeyValue* item = [[self httpHeader] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpHeader"];
    }
    if([self httpType])
    {
        [result setValue:[self httpType] forKey:@"httpType"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self probes])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self probes] count]; i++) {
            Probe* item = [[self probes] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"probes"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.httpBody = [dictionary objectForKey:@"httpBody"];
    NSArray* httpCookieArray = [dictionary objectForKey:@"httpCookie"];
    if(httpCookieArray&&![httpCookieArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpCookieArray count];i++)
        {
            KeyValue* item = [[KeyValue alloc]initWithDic:[httpCookieArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.httpCookie = propertyArray;
    }
    NSArray* httpHeaderArray = [dictionary objectForKey:@"httpHeader"];
    if(httpHeaderArray&&![httpHeaderArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpHeaderArray count];i++)
        {
            KeyValue* item = [[KeyValue alloc]initWithDic:[httpHeaderArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.httpHeader = propertyArray;
    }
    self.httpType = [dictionary objectForKey:@"httpType"];
    self.name = [dictionary objectForKey:@"name"];
    NSArray* probesArray = [dictionary objectForKey:@"probes"];
    if(probesArray&&![probesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [probesArray count];i++)
        {
            Probe* item = [[Probe alloc]initWithDic:[probesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.probes = propertyArray;
    }
    return self;
}
 @end
@implementation ResourceOption
-(id) initWithResourceItems:(NSArray<ResourceItem*>*) resourceItems
      tagsOption:(TagsOption*)tagsOption { 
     self.resourceItems = resourceItems;               
     self.tagsOption = tagsOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceItems])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self resourceItems] count]; i++) {
            ResourceItem* item = [[self resourceItems] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resourceItems"];
    }
    if([self tagsOption])
    {
        [result setValue:[[self tagsOption] dictionary]forKey:@"tagsOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* resourceItemsArray = [dictionary objectForKey:@"resourceItems"];
    if(resourceItemsArray&&![resourceItemsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resourceItemsArray count];i++)
        {
            ResourceItem* item = [[ResourceItem alloc]initWithDic:[resourceItemsArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.resourceItems = propertyArray;
    }
    self.tagsOption = [[TagsOption alloc]initWithDic:[dictionary objectForKey:@"tagsOption"]];
    return self;
}
 @end
@implementation RuleOptionDetail
-(id) initWithRules:(NSArray<BasicRuleDetail*>*) rules
      templateOption:(TemplateOption*)templateOption { 
     self.rules = rules;               
     self.templateOption = templateOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self rules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self rules] count]; i++) {
            BasicRuleDetail* item = [[self rules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"rules"];
    }
    if([self templateOption])
    {
        [result setValue:[[self templateOption] dictionary]forKey:@"templateOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* rulesArray = [dictionary objectForKey:@"rules"];
    if(rulesArray&&![rulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [rulesArray count];i++)
        {
            BasicRuleDetail* item = [[BasicRuleDetail alloc]initWithDic:[rulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.rules = propertyArray;
    }
    self.templateOption = [[TemplateOption alloc]initWithDic:[dictionary objectForKey:@"templateOption"]];
    return self;
}
 @end
@implementation RuleOption
-(id) initWithRules:(NSArray<BasicRule*>*) rules
      templateOption:(TemplateOption*)templateOption { 
     self.rules = rules;               
     self.templateOption = templateOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self rules])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self rules] count]; i++) {
            BasicRule* item = [[self rules] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"rules"];
    }
    if([self templateOption])
    {
        [result setValue:[[self templateOption] dictionary]forKey:@"templateOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* rulesArray = [dictionary objectForKey:@"rules"];
    if(rulesArray&&![rulesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [rulesArray count];i++)
        {
            BasicRule* item = [[BasicRule alloc]initWithDic:[rulesArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.rules = propertyArray;
    }
    self.templateOption = [[TemplateOption alloc]initWithDic:[dictionary objectForKey:@"templateOption"]];
    return self;
}
 @end
@implementation DescribeGroupAlarm
-(id) initWithAlarmId:(NSString*) alarmId
      alarmStatus:(NSNumber*)alarmStatus
      alarmStatusList:(NSArray<NSNumber*>*)alarmStatusList
      createTime:(NSString*)createTime
      dimension:(NSString*)dimension
      dimensionName:(NSString*)dimensionName
      enabled:(NSNumber*)enabled
      product:(NSString*)product
      productName:(NSString*)productName
      resourceOption:(ResourceOption*)resourceOption
      ruleName:(NSString*)ruleName
      ruleOption:(RuleOptionDetail*)ruleOption
      ruleType:(NSString*)ruleType
      ruleVersion:(NSString*)ruleVersion
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags { 
     self.alarmId = alarmId;               
     self.alarmStatus = alarmStatus;               
     self.alarmStatusList = alarmStatusList;               
     self.createTime = createTime;               
     self.dimension = dimension;               
     self.dimensionName = dimensionName;               
     self.enabled = enabled;               
     self.product = product;               
     self.productName = productName;               
     self.resourceOption = resourceOption;               
     self.ruleName = ruleName;               
     self.ruleOption = ruleOption;               
     self.ruleType = ruleType;               
     self.ruleVersion = ruleVersion;               
     self.tags = tags;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self alarmId])
    {
        [result setValue:[self alarmId] forKey:@"alarmId"];
    }
    if([self alarmStatus])
    {
        [result setValue:[self alarmStatus] forKey:@"alarmStatus"];
    }
    if([self alarmStatusList])
    {
        [result setValue:[self alarmStatusList] forKey:@"alarmStatusList"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self dimensionName])
    {
        [result setValue:[self dimensionName] forKey:@"dimensionName"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self productName])
    {
        [result setValue:[self productName] forKey:@"productName"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleOption])
    {
        [result setValue:[[self ruleOption] dictionary]forKey:@"ruleOption"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self ruleVersion])
    {
        [result setValue:[self ruleVersion] forKey:@"ruleVersion"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.alarmId = [dictionary objectForKey:@"alarmId"];
    self.alarmStatus = [dictionary objectForKey:@"alarmStatus"];
    self.alarmStatusList = [dictionary objectForKey:@"alarmStatusList"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.dimensionName = [dictionary objectForKey:@"dimensionName"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.product = [dictionary objectForKey:@"product"];
    self.productName = [dictionary objectForKey:@"productName"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleOption = [[RuleOptionDetail alloc]initWithDic:[dictionary objectForKey:@"ruleOption"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.ruleVersion = [dictionary objectForKey:@"ruleVersion"];
    self.tags = [dictionary objectForKey:@"tags"];
    return self;
}
 @end
@implementation UpdateAlarmSpec
-(id) initWithAutoScalingPolicyId:(NSString*) autoScalingPolicyId
      baseContact:(NSArray<BaseContact*>*)baseContact
      dimension:(NSString*)dimension
      enabled:(NSNumber*)enabled
      noticeOption:(NSArray<NoticeOption*>*)noticeOption
      product:(NSString*)product
      resourceOption:(ResourceOption*)resourceOption
      ruleName:(NSString*)ruleName
      ruleOption:(RuleOption*)ruleOption
      ruleType:(NSString*)ruleType
      tags:(NSMutableDictionary<NSString*,NSString*>*)tags
      webHookOption:(WebHookOption*)webHookOption { 
     self.autoScalingPolicyId = autoScalingPolicyId;               
     self.baseContact = baseContact;               
     self.dimension = dimension;               
     self.enabled = enabled;               
     self.noticeOption = noticeOption;               
     self.product = product;               
     self.resourceOption = resourceOption;               
     self.ruleName = ruleName;               
     self.ruleOption = ruleOption;               
     self.ruleType = ruleType;               
     self.tags = tags;               
     self.webHookOption = webHookOption;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self autoScalingPolicyId])
    {
        [result setValue:[self autoScalingPolicyId] forKey:@"autoScalingPolicyId"];
    }
    if([self baseContact])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self baseContact] count]; i++) {
            BaseContact* item = [[self baseContact] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"baseContact"];
    }
    if([self dimension])
    {
        [result setValue:[self dimension] forKey:@"dimension"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self noticeOption])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self noticeOption] count]; i++) {
            NoticeOption* item = [[self noticeOption] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"noticeOption"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self resourceOption])
    {
        [result setValue:[[self resourceOption] dictionary]forKey:@"resourceOption"];
    }
    if([self ruleName])
    {
        [result setValue:[self ruleName] forKey:@"ruleName"];
    }
    if([self ruleOption])
    {
        [result setValue:[[self ruleOption] dictionary]forKey:@"ruleOption"];
    }
    if([self ruleType])
    {
        [result setValue:[self ruleType] forKey:@"ruleType"];
    }
    if([self tags])
    {
        [result setValue:[self tags] forKey:@"tags"];
    }
    if([self webHookOption])
    {
        [result setValue:[[self webHookOption] dictionary]forKey:@"webHookOption"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.autoScalingPolicyId = [dictionary objectForKey:@"autoScalingPolicyId"];
    NSArray* baseContactArray = [dictionary objectForKey:@"baseContact"];
    if(baseContactArray&&![baseContactArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [baseContactArray count];i++)
        {
            BaseContact* item = [[BaseContact alloc]initWithDic:[baseContactArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.baseContact = propertyArray;
    }
    self.dimension = [dictionary objectForKey:@"dimension"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    NSArray* noticeOptionArray = [dictionary objectForKey:@"noticeOption"];
    if(noticeOptionArray&&![noticeOptionArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [noticeOptionArray count];i++)
        {
            NoticeOption* item = [[NoticeOption alloc]initWithDic:[noticeOptionArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.noticeOption = propertyArray;
    }
    self.product = [dictionary objectForKey:@"product"];
    self.resourceOption = [[ResourceOption alloc]initWithDic:[dictionary objectForKey:@"resourceOption"]];
    self.ruleName = [dictionary objectForKey:@"ruleName"];
    self.ruleOption = [[RuleOption alloc]initWithDic:[dictionary objectForKey:@"ruleOption"]];
    self.ruleType = [dictionary objectForKey:@"ruleType"];
    self.tags = [dictionary objectForKey:@"tags"];
    self.webHookOption = [[WebHookOption alloc]initWithDic:[dictionary objectForKey:@"webHookOption"]];
    return self;
}
 @end
 
 


